<template>
	<view class="data-v-3bdadbbd content" :class="execute?'padding':''">
		<view class="status_bar data-v-3bdadbbd" :style="'margin-top:'+statusBarHeight+'px'+';'">
			<view class="view_back data-v-3bdadbbd" :style="'height:'+navigationBarHeight+'px'+';'">
				<uni-icons class="data-v-3bdadbbd" color="#333" size="22" type="back"></uni-icons>
			</view>
			<text class="text_title1 data-v-3bdadbbd"
				:style="'height:'+navigationBarHeight+'px'+';'+'padding-right:'+'80rpx'+';'+'line-height:'+navigationBarHeight+'px'">方案详情</text>
		</view>
		<view class="scroll-wrap data-v-3bdadbbd">
			<view class="scheme_title data-v-3bdadbbd"
				:style="'padding-top:'+(statusBarHeight+navigationBarHeight+20)+'px'">
				<image class="head_image data-v-3bdadbbd" mode="widthFix" src=""></image>
				<view class="data-v-3bdadbbd" style="margin-top:30rpx;align-items:center;">
					<text class="BebasNeueBold data-v-3bdadbbd"
						style="font-size:44rpx;color:#e83229;font-weight:600;">{{schemeData.frequency}}</text>
					<text class="data-v-3bdadbbd" style="font-size:32rpx;color:#1e3564;">{{'次/'}}</text>
				</view>
				<view class="data-v-3bdadbbd" style="margin-top:14rpx;align-items:center;"
					v-for="(item,index) in schemeData.checkInPointList" :key="index">
					<image class="data-v-3bdadbbd" mode="widthFix" src=""
						style="width:28rpx;height:28rpx;margin-right:12rpx;vertical-align:middle;" v-if="index==0">
					</image>
					<text class="data-v-3bdadbbd"
						:style="'font-size: 28rpx;color: #293e73;'+(index!==0?'padding-left: 20px;':'')">{{item}}</text>
				</view>
				<view class="data-v-3bdadbbd" style="margin-top:11rpx;align-items:center;">
					<image class="data-v-3bdadbbd" mode="widthFix" src=""
						style="width:26rpx;height:26rpx;margin-right:14rpx;vertical-align:middle;"></image>
					<text class="data-v-3bdadbbd" style="font-size:28rpx;color:#293e73;">{{'-\n'}}</text>
				</view>
			</view>
			<block v-for="(value,index) in baseline_components" :key="index">
				<heart_rate_belt class="data-v-3bdadbbd vue-ref-in-for" :data="schemeDetail" data-ref="heartRateBelt"
					:finishRecordList="finishRecordList" :param="value" :sportway_item="sportway_item"
					v-if="value.sportWayNumber==1"></heart_rate_belt>
				<warm_up class="data-v-3bdadbbd" :data="schemeDetail" :param="value" :sportway_item="sportway_item"
					v-if="value.sportWayNumber==2"></warm_up>
				<waterrower_warm_up class="data-v-3bdadbbd" :data="schemeDetail" :param="value"
					:sportway_item="sportway_item" v-if="value.sportWayNumber==3"></waterrower_warm_up>
				<circuit_weight_lift_training :childResultList="childResultList" class="data-v-3bdadbbd"
					:data="schemeDetail" :param="value" :sportway_item="sportway_item" v-if="value.sportWayNumber==4">
				</circuit_weight_lift_training>
				<bicycle class="data-v-3bdadbbd" :data="schemeDetail" :finishRecordList="finishRecordList"
					:param="value" :sportway_item="sportway_item" v-if="value.sportWayNumber==5"></bicycle>
				<treadmill class="data-v-3bdadbbd" :data="schemeDetail" :param="value" :sportway_item="sportway_item"
					v-if="value.sportWayNumber==6"></treadmill>
				<elliptical_trainer class="data-v-3bdadbbd" :data="schemeDetail" :param="value"
					:sportway_item="sportway_item" v-if="value.sportWayNumber==7"></elliptical_trainer>
				<resistance_rower class="data-v-3bdadbbd" :data="schemeDetail" :param="value"
					:sportway_item="sportway_item" v-if="value.sportWayNumber==8"></resistance_rower>
				<relax_stretch class="data-v-3bdadbbd" :data="schemeDetail" :param="value"
					:sportway_item="sportway_item" v-if="value.sportWayNumber==9"></relax_stretch>
				<close_heart_rate_belt class="data-v-3bdadbbd vue-ref-in-for" :data="schemeDetail"
					data-ref="ClsoeHeartRateBelt" :finishRecordList="finishRecordList" :param="value"
					:sportway_item="sportway_item" v-if="value.sportWayNumber==10"></close_heart_rate_belt>
			</block>
			<view class="view_bottom data-v-3bdadbbd" v-if="execute">
				<button class="btn data-v-3bdadbbd" :disabled="!execute" type="warn">开始训练</button>
			</view>
		</view>
		<uni-popup backgroundColor="rgba(0,0,0,0.000)" class="data-v-3bdadbbd" data-ref="popup"
			maskClick="false" type="bottom">
			<view class="popup_view data-v-3bdadbbd">
				<text class="popup_content data-v-3bdadbbd">{{'下载教学视频将消耗'+needDownLoadVideosSize+'流量。确定下载？'}}</text>
				<view class="progress-box data-v-3bdadbbd" :hidden="!comfirmDownload">
					<text
						class="popup_tips data-v-3bdadbbd">{{'下载第'+downLoadindex+1+'个视频,共'+needDownLoadVideos.length+'个'}}</text>
					<progress :active="true" activeMode="forwards" activeColor="red" borderRadius="4"
						class="data-v-3bdadbbd" :percent="videoPercent" showInfo="true" strokeWidth="8"></progress>
				</view>
				<view class="data-v-3bdadbbd">
					<button class="popup_btn2 data-v-3bdadbbd" type="default">取消</button>
					<button class="popup_btn2 data-v-3bdadbbd" :disabled="comfirmDownload" type="warn">下载</button>
				</view>
			</view>
		</uni-popup>
		<uni-popup backgroundColor="rgba(0,0,0,0.000)" class="data-v-3bdadbbd vue-ref" data-ref="trainCompleteTipRef"
			type="center">
			<view class="popup_view train data-v-3bdadbbd">
				<view class="train-img data-v-3bdadbbd">
					<image class="data-v-3bdadbbd" mode="aspectFill" src=""></image>
				</view>
				<view class="train-title data-v-3bdadbbd">今日训练已完成</view>
				<view class="train-sub-title data-v-3bdadbbd">请前往进行体重检测</view>
				<view class="data-v-3bdadbbd"
					style="display:flex;justify-content:space-between;width:100%;margin:40rpx 0 0;">
					<button class="popup_btn2 data-v-3bdadbbd" type="default">稍后再去</button>
					<button class="popup_btn2 data-v-3bdadbbd" type="warn">前往检测</button>
				</view>
			</view>
		</uni-popup>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				isCheckIn: false,
				baseline_components: [],
				sport_way_video: [],
				id: "",
				schemeDetail: {},
				schemeData: {
					frequency: '',
					checkInPointList: []
				},
				videoPercent: 0,
				downLoadindex: 0,
				comfirmDownload: !1,
				needDownLoadVideos: [],
				downloadTask: null,
				needDownLoadVideosSize: 0,
				execute: true,
				schemeStart: false,
				finishRecordList: [],
				executeId: 0,
				executeNextSport: false,
				isOnLoad: false,
				childResultList: [],
				sportway_item: [],
				backgroundColor: {
					backgroundColor: "rgba(207,227,254,0)"
				},
				statusBarHeight: 0,
				navigationBarHeight: 0,
				trainCompleteTipRef: null,
				projectUserId: 0,
			};
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style>
	page {
		min-height: 100%;
		width: 100%;
	}

	page,
	view.data-v-3bdadbbd {
		display: flex;
	}

	.tab_content.data-v-3bdadbbd {
		background-color: #fff;
		flex: 1;
		flex-direction: column;
		overflow: hidden;
		position: relative;
	}

	.status_bar.data-v-3bdadbbd {
		position: fixed;
		top: 0;
		width: 100%;
		z-index: 9;
	}

	.view_back.data-v-3bdadbbd {
		align-items: center;
		display: flex;
		justify-content: center;
		width: 80rpx;
	}

	.text_title1.data-v-3bdadbbd {
		flex: 1;
		font-size: 32rpx;
		font-weight: 600;
		text-align: center;
	}

	.scroll-wrap.data-v-3bdadbbd {
		flex: 1;
		flex-direction: column;
		margin-bottom: 16rpx;
		position: relative;
	}

	.scroll.data-v-3bdadbbd {
		bottom: 0;
		flex: 1;
		position: absolute;
		top: 0;
	}

	.content.data-v-3bdadbbd {
		background-color: #f2f3f5;
		flex: 1;
		flex-direction: column;
		min-height: 100%;
		overflow: hidden;
	}

	.padding.data-v-3bdadbbd {
		padding-bottom: 140rpx;
	}

	.view_bottom.data-v-3bdadbbd {
		flex-end: true;
		background-color: #f2f3f5;
		bottom: 0;
		flex: 1;
		flex-direction: column;
		height: 140rpx;
		left: 50%;
		position: fixed;
		transform: translateX(-50%);
		width: 100%;
	}

	.btn.data-v-3bdadbbd,
	.view_bottom.data-v-3bdadbbd {
		align-items: center;
		display: flex;
		justify-content: center;
	}

	.btn.data-v-3bdadbbd {
		background-color: #ef4141;
		border-radius: 50rpx;
		color: #fff;
		font-size: 32rpx;
		height: 80rpx;
		width: 90%;
	}

	.btn.data-v-3bdadbbd:active {
		background-color: #f79f9f;
	}

	.head_image.data-v-3bdadbbd {
		height: auto;
		position: absolute;
		right: 40rpx;
		top: 80rpx;
		width: 236rpx;
	}

	.scheme_title.data-v-3bdadbbd {
		background-color: #cfe3fe;
		border-bottom-left-radius: 50rpx;
		border-bottom-right-radius: 50rpx;
		flex-direction: column;
		margin-bottom: 10rpx;
		min-height: 216rpx;
		overflow: hidden;
		padding-bottom: 30rpx;
		padding-left: 42rpx;
		padding-top: 40rpx;
		position: relative;
	}

	.head_cotent.data-v-3bdadbbd {
		display: flex;
		flex-direction: column;
		height: auto;
		position: fixed;
		width: 100%;
		z-index: 1;
	}

	.popup_title.data-v-3bdadbbd {
		color: #3a3a3a;
		font-size: 40rpx;
		font-weight: 600;
	}

	.popup_content.data-v-3bdadbbd {
		color: rgba(0, 0, 0, 0.8);
		font-size: 32rpx;
		margin-bottom: 32rpx;
	}

	.popup_tips.data-v-3bdadbbd {
		color: rgba(0, 0, 0, 0.7);
		font-size: 26rpx;
		margin-bottom: 8rpx;
	}

	.popup_view.data-v-3bdadbbd {
		background: #fff;
		border-radius: 20rpx;
		flex-direction: column;
		margin: 30rpx;
		padding: 44rpx;
	}

	.train.data-v-3bdadbbd {
		align-items: center;
		background-image: linear-gradient(180deg,
				#fdf8e4 10%,
				hsla(48, 86%, 94%, 0.8) 0,
				hsla(48, 86%, 94%, 0.6) 15%,
				#fff 50%);
		position: relative;
	}

	.train-img.data-v-3bdadbbd {
		bottom: 300rpx;
		position: absolute;
	}

	.train-title.data-v-3bdadbbd {
		font-size: 36rpx;
		font-weight: 700;
		margin-bottom: 16rpx;
		padding-top: 120rpx;
	}

	.train-sub-title.data-v-3bdadbbd {
		color: #787876;
		font-size: 28rpx;
	}

	.popup_btn1.data-v-3bdadbbd {
		align-items: center;
		border-radius: 50rpx;
		display: flex;
		flex: 1;
		font-size: 32rpx;
		height: 80rpx;
		justify-content: center;
		width: auto;
	}

	button.data-v-3bdadbbd::after {
		border: none;
	}

	.popup_btn2.data-v-3bdadbbd {
		align-items: center;
		border-radius: 50rpx;
		display: flex;
		flex: 1;
		font-size: 32rpx;
		height: 80rpx;
		justify-content: center;
		margin-left: 32rpx;
		width: auto;
	}

	.progress-box.data-v-3bdadbbd {
		flex: 1;
		flex-direction: column;
		margin-bottom: 40rpx;
	}

	.checkin.data-v-3bdadbbd {
		align-items: center;
	}

	.checkin.data-v-3bdadbbd :active {
		color: #eee;
	}

	.checkin_finish.data-v-3bdadbbd {
		align-items: center;
	}

	.checkin-wrapper.data-v-3bdadbbd {
		background-color: #fff;
		border-radius: 50rpx 0 0 50rpx;
		box-shadow: 0 0 12rpx #00000016;
		padding: 10rpx 30rpx 10rpx 10rpx;
		position: fixed;
		right: 0;
		top: 17%;
	}

	.BebasNeueBold.data-v-3bdadbbd {
		font-family: BebasNeueBold;
	}
</style>